/**
 * author:Administrator
 * date:2016/1/9
 * desc:TODO
 */
'use strict';
var app = require('koa')();
var httpPort = 9901;

// static file
var serve = require('koa-static');
app.use(serve(__dirname + '/static'));

// 404
app.use(function*() {
  this.status = 404;
  this.body = '~~~404 not found~~~';
});

app.listen(httpPort, function () {
  console.log('server listen at localhost:%s', httpPort);
});